<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">

</head>
<body>
<audio id="myaudio" src="3.mp3" controls="controls" loop="false" hidden="true" >
</audio>
<input type="button" onclick="autoPlay()" value="播放"/>
<input type="button" onclick="pause()" value="暂停"/>
<script language="javascript" type="text/javascript">
    function autoPlay(){
        var myAuto = document.getElementById('myaudio');
        myAuto.play();
    }
    function pause(){
        var myAuto = document.getElementById('myaudio');
        myAuto.pause();
    }
</script>
</body>
</html>